package com.itany.mp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author shixiaojun@itany
 */
@Data
@TableName("t_emp")
@NoArgsConstructor
@AllArgsConstructor
public class Emp {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private Double salary;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime joinTime;
    // 是否在职。1:员工在职 0:员工离职
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer status;

    public Emp(String name, Double salary) {
        this.name = name;
        this.salary = salary;
    }
}
